package training;

import java.util.*;
//https://www.nowcoder.com/questionTerminal/286af664b17243deb745f69138f8a800
// 注意类名必须为 test.Main, 不要有任何 package xxx 信息
public class Day35_02 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNext()) { // 注意 while 处理多个 case
            String s = in.nextLine();
            String s1 = in.nextLine();
            Set<String> set = new HashSet<>();
            for (int i = 0; i < s.length();) {
                if(s.charAt(i) == '\"'){
                    s = s.substring(1);
                    String temp = s.substring(0,s.indexOf("\""));
                    set.add(temp);
                    s = s.substring(1+temp.length());
                    if(s.isEmpty()){
                        break;
                    } else {
                        s = s.substring(1);
                    }
                } else {
                    int index = s.indexOf(",");
                    if(index != -1) {
                        String temp = s.substring(0, index);
                        s = s.substring(1 + temp.length());
                        set.add(temp);
                    }else {
                        set.add(s);
                        break;
                    }
                }
            }
            boolean flag = false;
            for (String string: set) {
                if(string.equals(s1)){
                    flag = true;
                    break;
                }
            }
            if(flag){
                System.out.println("Ignore");
            }else {
                System.out.println("Important!");
            }
        }
    }
}